const path = require('path')
const fpath = 'a/b/c/d/index.html'

console.log(path.extname(fpath))